package com.suredy.app.porject.export.model;

/**
 * 材料合同台帐
 * 
 * @author VIVID.G
 * @since 2016-3-10
 * @version v0.1
 */
public class MaterialContractCountModel {

	/* 主合同编号 */
	private String parentNo;

	/* 材料合同编号 */
	private String no;

	/* 材料合同名称 */
	private String name;

	/* 供货单位 */
	private String companyB;

	/* 合同金额 */
	private Double price;

	/* 结算金额 */
	private Double jsPrice;

	/* 付款 */
	private Double payoutPrice;

	/* 发票开具情况 */
	private String invoiceStatus;

	/* 挂账情况 */
	private String guazhangStatus;

	/* 主合同日期 */
	private String parentGq;

	/* 材料合同日期 */
	private String htGq;

	/* 备注 */
	private String remark;

	public String getParentNo() {
		return parentNo;
	}

	public void setParentNo(String parentNo) {
		this.parentNo = parentNo;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCompanyB() {
		return companyB;
	}

	public void setCompanyB(String companyB) {
		this.companyB = companyB;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getJsPrice() {
		return jsPrice;
	}

	public void setJsPrice(Double jsPrice) {
		this.jsPrice = jsPrice;
	}

	public Double getPayoutPrice() {
		return payoutPrice;
	}

	public void setPayoutPrice(Double payoutPrice) {
		this.payoutPrice = payoutPrice;
	}

	public String getInvoiceStatus() {
		return invoiceStatus;
	}

	public void setInvoiceStatus(String invoiceStatus) {
		this.invoiceStatus = invoiceStatus;
	}

	public String getGuazhangStatus() {
		return guazhangStatus;
	}

	public void setGuazhangStatus(String guazhangStatus) {
		this.guazhangStatus = guazhangStatus;
	}

	public String getParentGq() {
		return parentGq;
	}

	public void setParentGq(String parentGq) {
		this.parentGq = parentGq;
	}

	public String getHtGq() {
		return htGq;
	}

	public void setHtGq(String htGq) {
		this.htGq = htGq;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * 未付金额
	 * 
	 * @return
	 */
	public Double getLastPrice() {
		Double price = this.getJsPrice();

		if (price == null)
			price = this.getPrice();

		if (price == null)
			return null;

		Double payout = this.getPayoutPrice();
		if (payout == null)
			payout = 0d;

		return price - payout;
	}

}
